﻿<div class="header_btbox">
    <div class="header_bt">
        <div class="header_blc">
            <h1> <a href="#">旺店</a> </h1>
            <ul>
                <li id="index"><a hidefocus="true" class="ic_index" href="/manage/index.aspx">首页</a></li>
                <li id="counselor" class=""><a hidefocus="true" class="ic_webb" href="/manage/counselor/counselorlist.aspx">顾问管理</a></li>
                <li id="order" class=""><a hidefocus="true" class="ic_webb" href="/manage/order/orderList.aspx">订单信息</a></li>
                <li id="customlistpage" class=""><a target="_blank" hidefocus="true" class="ic_webb" href="/manage/cms/customlistpagelist.aspx">CMS系统</a></li>
                <li id="systembase" class=""><a hidefocus="true" class="ic_webb" href="/manage/systembase/dictionaryalllist.aspx">系统设置</a></li>
              
            </ul>
            <div class="rt_navbox"><ol class="rt_nav"><li><a href="/loginout.aspx"><strong>退出系统</strong></a></li></ol></div>
        </div>
    </div>
</div>

<script type="text/javascript">
    $(function () {
        var currentUrl = window.location.href.toLocaleLowerCase();
        var $menu;
        var $menutoo;
        if (currentUrl.indexOf("/index") > -1) {
            $menu = $("#index");
        } else if (currentUrl.indexOf("/systembase/") > -1 || currentUrl.indexOf("/authority/") > -1) {
            $menu = $("#systembase");
            $menutoo = $("#menu_systembase");
        } else if (currentUrl.indexOf("/customlistpage/") > -1) {
            $menu = $("#customlistpage");
            $menutoo = $("#menu_customlistpage");
        }  else if (currentUrl.indexOf("/counselor/") > -1) {
            $menu = $("#counselor");
            $menutoo = $("#menu_counselor");
        } else if (currentUrl.indexOf("/businesstype/") > -1) {
            $menu = $("#counselor");
            $menutoo = $("#menu_counselor");
        } if (currentUrl.indexOf("/order/") > -1 || currentUrl.indexOf("/pay/") > -1) {
            $menu = $("#order");
            $menutoo = $("#menu_order");
        }


        $menu.addClass("current");
        $menutoo.css("display", "block");

        $menutoo.find("a").each(function () {
            debugger;
            var $this = $(this);

            if ($this.attr("href").indexOf("/companylist") > -1 || $this.attr("href").indexOf("/companyinfo") > -1 || $this.attr("href").indexOf("/contactinfo") > -1 || $this.attr("href").indexOf("/mapinfo") > -1) {
                $this.addClass("current");
                return;
            }
            var objurl = $this.attr("url");
            if (objurl != null) {
                var obj = objurl.split(",");
                for (var key in obj) {

                    if (currentUrl.indexOf(obj[key].toLocaleLowerCase()) > -1) {
                        $this.addClass("current");
                        return;
                    }
                }
            }

            if (currentUrl.indexOf($this.attr("href")) > -1) {
                $this.addClass("current");
                return;
            }
        });
    });

</script>